import os
from google.appengine.ext.webapp import template
import settings

def get(file, values={}):
    return template.render(os.path.join(settings.ROOT_PATH, file), values)

def getJs(js_list, prefix=''):
    return ','.join(['\'%s%s\'' % (prefix, js) for js in js_list])

def getCss(css_list, prefix=''):
    html_css = '<link rel="stylesheet" type="text/css" href="%s%s" media="all" />' 
    return ''.join([html_css % (prefix, css) for css in css_list])
